package mahmoud.utils;

public class WieghtedTerm implements Comparable<WieghtedTerm>
{
	public String Term;
	public double wieght;
	public WieghtedTerm(String iTerm, double d)
	{
		wieght = d;
		Term = iTerm;
	}
	@Override
	public int compareTo(WieghtedTerm that) 
	{
		if(this.wieght > that.wieght)
			return -1;
		else if(this.wieght < that.wieght)
			return 1;
//		return (int) (this.wieght - that.wieght);
		return 0;
	}
	public String toString()
	{
		return Term+": "+wieght;
	}

}
